package com.ikun.mapper;

import com.ikun.pojo.TbComment;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TbCommentMapper {

    //查询我完成的任务的方法
    public List<TbComment> selMyComment(@Param("id")int userid, @Param("pg")int page);

    //查询我完成的任务的数量的方法
    @Select("select count(*) from tb_comment where userid = #{id}")
    public int selMyCommentCount(@Param("id")int userid);

    //查询任务
    public List<TbComment> selComment(@Param("id")int taskid);

    //添加任务
    public int addComment(@Param("c") TbComment tbComment);

}